﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using FC.Model;


namespace FC.ViewModel.TaskScoreVMs
{
    public partial class TaskScoreTemplateVM : BaseTemplateVM
    {
        public ExcelPropety TaskItem_Excel = ExcelPropety.CreateProperty<TaskScore>(x => x.TaskItemId);
        [Display(Name = "分数")]
        public ExcelPropety Score_Excel = ExcelPropety.CreateProperty<TaskScore>(x => x.Score);
        public ExcelPropety User_Excel = ExcelPropety.CreateProperty<TaskScore>(x => x.UserId);

	    protected override void InitVM()
        {
            TaskItem_Excel.DataType = ColumnDataType.ComboBox;
            TaskItem_Excel.ListItems = DC.Set<TaskItem>().GetSelectListItems(Wtm, y => y.Name);
            User_Excel.DataType = ColumnDataType.ComboBox;
            User_Excel.ListItems = DC.Set<FrameworkUser>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class TaskScoreImportVM : BaseImportVM<TaskScoreTemplateVM, TaskScore>
    {

    }

}
